class EXAMPLE1

insert
	IUP_INTERFACE

create {ANY}
   make

feature {ANY}

   make
      local
 			gui: IUP
			i: STRING
			a: ARRAY[IUP_WIDGET]
			l: IUP_LABEL
			b: IUP_BUTTON
			f: IUP_FLAT_BUTTON
			v: IUP_VBOX
			w: IUP_DIALOG

      do
			gui := iup_open
			
			create l.label("Hello world from Liberty Eiffel!")
			
	      create b.button("OK")
			b.set_cb_action(agent close(?))
	      b.set_rgb_background_color(0, 200, 0) -- This not work on Gtk3, use IUP_FLAT_BUTTON as show below.

			create f.flat_button("A flat button")
			f.set_cb_flat_action(agent close(?))
			f.set_rgb_background_color(0, 200, 0)
			f.set_padding(5, 3)
			f.set_border(True)

			a := {ARRAY[IUP_WIDGET] 1, << l, b, f >>}

	      create v.vbox(a)
	      v.set_alignment("ACENTER")
			v.set_gap(10)
			v.set_margin(10, 10)
			
	      create w.dialog(v)

			w.set_title("Hello world")
	      i := w.show

         gui.main_loop
			gui.close
      end

	close (widget: IUP_WIDGET): STRING
		do
			io.put_string("Executed %N")
			Result := "IUP_CLOSE"
		end

end -- class EXAMPLE1
